<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <script>
    function validate() {
      var x = document.forms["UserForm"]["Name"].value;
      if (x == null || x == "") {
        alert("用户名不能为空！");
        return false;
      }
      //请补充其它验证
    }
  </script>
</head>

<body>
  <form name="UserForm" action="UserRegister.jsp" onsubmit="return validate()" method="post">
    <table border="0" bordercolor="#FF0000">
      <tr>
        <td>用户名:</td>
        <td>
          <input type="text" name="Name">
        </td>
      </tr>
      <!--请补充其它信息-->
    </table>
    <input type="submit" value="提交">
  </form>
</body>

</html>